home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / encryp1r / frmmain.frm (.txt) next >
Encoding:
Visual Basic Form  |  1999-08-24  |  1.6 KB  |  42 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   1644
  5.    ClientLeft      =   48
  6.    ClientTop       =   276
  7.    ClientWidth     =   4644
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   1644
  10.    ScaleWidth      =   4644
  11.    StartUpPosition =   3  'Windows Default
  12. Attribute VB_Name = "Form1"
  13. Attribute VB_GlobalNameSpace = False
  14. Attribute VB_Creatable = False
  15. Attribute VB_PredeclaredId = True
  16. Attribute VB_Exposed = False
  17. Option Explicit
  18. Private Sub Form_Load()
  19. Dim htmlCode As String
  20. Dim curURL As String
  21. Dim tagArray() As HTMLTag
  22. ' htmlCode is a string containing the html source code
  23. ' you want to parse. This can be retrieved by either
  24. ' reading in a local file or by downloading a file from
  25. ' the internet. This is left up to the programmer to do.
  26. htmlCode = "<HTML><BODY>Hi.</BODY></HTML>"
  27. ' curURL is used when a relative file name is encountered
  28. ' such as in a link or IMG tag. For exmaple:
  29. ' <IMG SRC="../img/header.gif">
  30. ' In order for this URL to be affective, you will need to make
  31. ' it into a fully qualified URL by prepending curURL to it
  32. ' to form: http://www.yahoo.com/../img/header.gif"
  33. curURL = "http://www.yahoo.com/"
  34. HTMLParse htmlCode, curURL, tagArray
  35. ' Now tagArray is filled with the tags
  36. ' Lets print some items to the form
  37. ' showing off our new found knowledge
  38. Print UBound(tagArray); " tags were found in htmlCode$"
  39. Print tagArray(0).Full; " is the first tag I found in htmlCode$"
  40. Print tagArray(UBound(tagArray) - 1).Full; " is the last tag I found in htmlCode$"
  41. End Sub
  42.